package router

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"socials/api/handler"
	"socials/middleware"
)

func Router(c *gin.Engine) {
	UserApi := c.Group("/api/user")
	ContactApi := c.Group("/api/contact")
	ChatApi := c.Group("/api/chat")
	MomentApi := c.Group("/api/moments")
	fmt.Println(UserApi, ContactApi, ChatApi, MomentApi)

	c.POST("chat", handler.Send)
	c.POST("create", handler.Create)
	c.POST("contact", handler.ContactAdd)
	c.Group("/api", middleware.JWtpPare())
	c.POST("/register", handler.Register)
	c.POST("/send", handler.Sms)
	c.POST("/login", handler.Login)
	c.POST("/moment", handler.MomentCreate)

}
